/**
 *******************************************************************************
 * @FileName  : kv_config.h
 * @Author    : GaoQiu
 * @CreateDate: 2021-4-27
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#ifndef _KV_CONFIG_H_
#define _KV_CONFIG_H_

#define CONFIG_KV_NEW_EN           1

#if CONFIG_KV_NEW_EN
	#define CONFIG_KV_FLASH_START_ADDR    (kv.flashStartAddr)
	#define CONFIG_KV_FLASH_SECTOR_SIZE   KV_PORT_FLASH_SECTOR_SIZE

	#define CONFIG_KV_BLOCK_SIZE          (kv.blockSize)  /*! The value must be an integer multiple of the flash sector. */
	#define CONFIG_KV_BLOCK_NUM           (kv.blockNum)   /*! This value must be >= 2 */
#else
	#define CONFIG_KV_FLASH_START_ADDR    0x78000
	#define CONFIG_KV_FLASH_SECTOR_SIZE   4096

	#define CONFIG_KV_BLOCK_SIZE          4096 /*! The value must be an integer multiple of the flash sector. */
	#define CONFIG_KV_BLOCK_NUM           (2)  /*! This value must be >= 2 */
#endif

#define CONFIG_KV_MAX_KEY_LEN         128 /* rang 1-255 */
#define CONFIG_KV_MAX_VALUE_LEN       (CONFIG_KV_BLOCK_SIZE - CONFIG_KV_MAX_KEY_LEN - KV_BLOCK_HDR_SIZE - KV_ITEM_HDR_SIZE)//512



#endif /* _KV_CONFIG_H_ */
